
import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { UsersModule } from '@/modules/admin/users/users.module'
import { JwtModule } from '@nestjs/jwt';

import { PRIVATE_JWT_SECRET_KEY, expiresIn, aud, jti } from '@/config/jwt'

@Module({
  imports: [
    UsersModule,
    JwtModule.register({
      global: true,
      secret: PRIVATE_JWT_SECRET_KEY,
      signOptions: {
        expiresIn,
        jwtid: jti,
        audience: aud,
      },
    }),
  ],
  controllers: [AuthController],
  providers: [AuthService],
  exports: [AuthService],
})
export class AuthModule { }
